﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TogheterWeBuyIt.Models.Usuario>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Details
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<table align="left" width="45%" style="right-margin:20px;">
<% if (!string.IsNullOrEmpty(Model.CPF))
   { %>
        <tr>
            <td style="width: 136px">CPF: </td>
            <td><%= Html.Encode(Model.CPF)%></td>
        </tr>
    <% } %>

    <% if (!string.IsNullOrEmpty(Model.CNPJ))
        { %>
        <tr>
            <td style="width: 136px">CNPJ: </td>
            <td><%= Html.Encode(Model.CNPJ)%></td>
        </tr>
        <% } %>

    <tr>
        <td style="width: 136px">Nome: </td>
        <td><%= Html.Encode(Model.Nome)%></td>
    </tr>
    <tr>
        <td style="width: 136px">Login: </td>
        <td><%= Html.Encode(Model.Login) %></td>
    </tr>
    <tr>
        <td style="width: 136px">Email: </td>
        <td><%= Html.Encode(Model.Email) %></td>
    </tr>  
</table>
    
        <asp:Panel ID="Panel1" ScrollBars="Auto" width="55%" runat="server" style="max-height:200px;" >
        <% Html.RenderPartial("Controls/UPromocoesUsuarios", Model); %>
        </asp:Panel>

       <p>
          <br />
         <asp:Panel ID="Panel3" ScrollBars="Auto" width="100%" runat="server" style="max-height:200px;" >
        <% Html.RenderPartial("Controls/UDesejaProdutosUsuario", Model); %>
        </asp:Panel>
        <% if(Session["LoggedUserId"] != null && Model.Id == (int)Session["LoggedUserId"]) %>
            <%= Html.ActionLink("Editar", "Edit", new { id=Model.Id }) %> 
    </p>

</asp:Content>

